#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

uint64_t getsp( void )
{
    uint64_t sp;
    asm( "mov %%rsp, %0" : "=rm" ( sp ));
    return sp;
}

void * test() {
    int localA[10]={100};

    int *local=(int*)malloc(sizeof(localA));
    
    printf("%p, %p, %p\n", localA, local, getsp());
    return (void *)local;
}

int main() {
    setbuf(stdout,NULL);
    printf("Hello\n");
    int *localM;

    localM = (int *)test();
    printf("localM=%p", localM);
}